package com.gdones.wms;

import cn.xuyanwu.spring.file.storage.EnableFileStorage;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * 仓储管理服务包
 * 2023/4/23
 */
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@EnableFileStorage
public class GDonesWMSApplication {

    public static void main(String[] args) {
        SpringApplication.run(GDonesWMSApplication.class,args);
    }

    //分页配置
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));// 分页的方法-以mysql分页方式实现
        return interceptor;
    }

}
